package cn.edu.scau.cmi.chenjiale.factory.third;

import cn.edu.scau.cmi.chenjiale.factory.type.Insurance;

/**
 * 保险抽象工厂类
 * 
 * 
 * @author chen.jiale
 *
 */
public abstract class InsuranceFactory {
	private static final String PICC = "PICC";
	
	private static final String PINGAN = "PingAn";
	
	public static InsuranceFactory getInsuranceFactory(String type) {
		InsuranceFactory factory = null;
		if(PICC.equals(type)) {
			factory = new PICCInsuranceFactory();
		}else if(PINGAN.equals(type)) {
			factory = new PingAnInsuranceFactory();
		}
		return factory;
	}
	
	public abstract Insurance getInsurance(String type);

}
